The Year 2000 problem and the Amiga
1. Scope of this documentThe following text refers to Amiga desktop computers built between 1986 and 1997 and only covers computer hardware configurations designed and built by Commodore-Amiga, Inc. This specifically excludes 3rd party hardware extensions, such as the Microbotics "StarBoard" which among other features offered a battery backed up clock, but it includes Amiga computers built by Amiga Technologies GmbH and Amiga, Inc.
2. How the Amiga handles date and timeThe Amiga operating system has always followed the Unix model in measuring time as the number of seconds that have elapsed since a fixed point of time. Under AmigaOS that fixed point of time (also known as `epoch') is 00:00:00 of January 1, 1978 (Unix uses 00:00:00 GMT, January 1, 1970). The operating system manages time and date through a central component known astimer.device . This component reads and stores date and time information
using a data structure known as timeval which, in `C' language notation,
is shown below:
struct timeval { ULONG tv_secs; ULONG tv_micro; }; In this context an Until AmigaOS 2.0 was introduced in 1989/1990 the operating system only provided the methods for time keeping but did not offer any means to convert the number of seconds elapsed since the AmigaOS epoch into human readable format. This work was left to application software developers who implemented different conversion algorithms with varying success.
2.1 The AmigaDOS date and time handling is special"AmigaDOS" and "AmigaOS" are not two names for the same thing. Exactly the opposite is true: AmigaDOS is (in a nutshell) the name of the AmigaOS layer which implements filing systems and their actions, the command line interpreter and which handles loading and relocation of executable binary files. AmigaDOS is more or less a port of the Cambridge University TRIPOS 32 bit kernel. It has its own peculiar data structures, including its own version of thetimeval
structure described above. The AmigaDOS flavour is known as DateStamp , as
shown below:
struct DateStamp { LONG ds_Days; LONG ds_Minute; LONG ds_Tick; }; In this context a
AmigaDOS uses
2.2 Local time vs GMTThe Amiga operating system never knew the concept of local and global time. While the AmigaOS 2.1 update (1992) introduced a locale preferences editor that allowed for the time zone to be selected, the operating system itself never put this feature to use or encouraged application software developers to use it. One might argue that with this background, the AmigaOS was always tuned to local time.
2.3 How the Amiga maintains its system timeThe early Amiga computer models did not support a battery backed up real time clock that would keep on ticking and maintaining local time even until after the machine was switched off. For example, the first Amiga computer ever (later christened the Amiga 1000) did not offer a battery backed up clock. For the Amiga 500 the battery backed up clock was an extra hardware feature one had to buy separately with a memory expansion. The Amiga 2000 and (with the exception of the Amiga 600 and Amiga 500+ models) all models to follow did feature a built-in battery backed up clock.On machines without battery backed up clocks, the Amiga sets its system time according to the modification date of the boot volume. In other words, the point of time the last file was modified or created on a disk would determine the system time. As this was by no means accurate, the AmigaOS boot process would suggest and prompt you to adjust the system date once the system had booted (as pictured below).
With machines that featured battery backed up clocks, the system time was
read during the boot process. As of AmigaOS versions 1.2 and 1.3 a special
program, called If the system starts up without being able to set its system time, it defaults to 00:00:00 January 1, 1978.
3. Setting and reading the timeThe Amiga offers both a command line interface and a graphical user interface. Both went through a number of changes over the years as will be described below.
3.1 The command line interfaceThere are two shell commands which deal with the system date, these beingSetClock and Date . The Date command is for reading and setting the
current system date whereas the SetClock command deals with the battery
backed up clock, it reads and stores the current system time from/in it. The
Date command is of particular interest due to the human readable date format
it uses by default. Today you might invoke the Date command and receive the
following output:
19-Sep-98 As one can see, the year number is limited to two digits only. Even if a different locale is used (e.g. french), the year will always be displayed with its two last decimals only. Luckily, this numbering is consistent with the following rule:
To set the system time to any year beyond 1999, you reverse the rule, i.e. entering date 01-jan-01 will set the time to 1 January, 2001.
All versions of the AmigaDOS
3.2 The graphical user interfaceThe system time is set through the preferences editor which in AmigaOS versions 1.0-1.3 used to be a single, monolithic program as pictured below:
The controls for setting the system time are located in the top left corner of
the window. They allow the last two digits of the year to be adjusted; the
model follows the AmigaDOS
With the introduction of AmigaOS 2.0, the time preferences editor was moved
into a single program named
In this editor, the year can be entered as a four digit number. However, the range is limited to the years 1978..2113. When the AmigaOS 2.1 update was released, the time preferences editor was revised, as can be seen below:
Just like with its predecessor, the year can be entered as a four digit number. In this case, the range is limited to the years 1991..2099.
4. The problemsAs far as is known today, the Amiga faces four date problems. Two are design problems caused by numeric overflow, one is caused by hardware limitations and one is a real bug that will strike in the year 2000.
4.1 Negative timeAs was outlined above, the Amiga measures time in seconds. As it turns out, the number of seconds to accumulate until 19 January, 2046, 03:14:07 will form the largest value a signed 32 bit integer number will hold. This is not a problem for the time keeping module (timer.device ), but application software
and other operating system components which treat the number of seconds as a
signed quantity will get into trouble one second later: the number of seconds
will rise to 2,147,483,648 which in two's complement format represents the
negative number -2,147,483,648. AmigaDOS, which always treats time as a signed
quantity, will consider this date to be invalid because it is negative. Worse,
the ROM date conversion routines exhibit a bug which, once the date is later
than 19 January, 2046, 03:14:07, causes all subsequent date operations to be
inaccurate. The immediate effect this has is that calculations on dates can be
off by more than two years.
This behaviour is consistent through all AmigaOS versions. A fix is not
available yet, but research is in progress to investigate whether this bug may
be fixed by updating several AmigaOS modules (
4.2 Time rolling overAn unsigned 32 bit integer can hold a maximum value of 4,294,967,295. When the Amiga has accumulated that many seconds, it will be 7 February, 2114, 06:28:15. One second later the seconds counter will roll over and restart at 0. In other words, on 7 February, 2114, 06:28:16 the Amiga will believe that it is midnight on 1 January, 1978.No fix for this problem is available yet.
4.3 The battery backed up clock can count only to 99Amiga computers that feature a battery backed up real time clock use one of two different hardware designs: either the Oki MSM6242RS (A500, A2000) or the Ricoh RP5C01 (A3000, A1200, A4000) chip. As is common with clock chips of that type, the year counter is implemented as a two digit BCD number. Once it reaches the year 99, the counter will roll over and start again with 00.
Starting with Amiga operating system version 2.0, the boot process will read
the battery backed up clock time and set the system time accordingly. This
takes place every time the Amiga is reset. Because the year number covers only
two digits, the same algorithm as used by the AmigaDOS No fix for this problem is available yet.
4.4 SetClock stops working in the year 2000TheSetClock program shipped with the Amiga Workbench disk revisions 1.2 and
1.3 exhibits a bug which causes it to miscalculate the battery backed up clock
time starting with the year 2000. It is accurate only for the years
1978..1999. Once the year counter rolls over to 00, SetClock will believe
that the year is 1978 until the year 2079 is reached; that's when it will
believe that the year is 1979 -- which is not necessarily an improvement.
Please note that only the
A fix for this problem is provided in this archive. Download it and unpack it,
then read the enclosed
Written by Olaf Barthel • © Copyright 1998 Amiga, Inc. |